home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group99a.txt / 000085_icon-group-sender _Mon Apr 5 13:20:34 1999.msg < prev    next >
Internet Message Format  |  2000-09-20  |  6KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA02010
  4.     for icon-group-addresses; Mon, 5 Apr 1999 13:20:09 -0700 (MST)
  5. Message-Id: <199904052020.NAA02010@baskerville.CS.Arizona.EDU>
  6. From: "Mark Evans" <evans@gte.net>
  7. To: "Icon List" <icon-group@optima.CS.Arizona.EDU>
  8. Subject: RE: Ccon and Icon-based Compilers
  9. Date: Mon, 5 Apr 1999 11:52:15 -0500
  10. X-Priority: 3 (Normal)
  11. X-MSMail-Priority: Normal
  12. Importance: Normal
  13. X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
  14. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  15. Status: RO
  16.  
  17. Thanks, Todd!  Helpful comments.
  18.  
  19. Garbage collection is not a big deal to me, e.g.
  20. http://reality.sgi.com/boehm_mti/gc.html
  21.  
  22. As for runtime support, it already exists in C.  The Icon interpreter is
  23. implemented in C.  All I have to do is tweak the code that is there already.
  24. (With Jcon, you did not have Java code for the runtime system; your case is not
  25. the same as mine.)
  26.  
  27. I like co-expressions but detest their current implementation, which involves
  28. custom assembly language.  Yuk!  I want to rewrite that stuff, whether with
  29. threads or something simpler.
  30.  
  31. Type inferencing is fine if it helps performance, and if there is code already
  32. out there.  Presumably I can get my hands on the source to "iconc" and determine
  33. how it was done.
  34.  
  35. We can talk ourselves blue in the face about whether C will perform better than
  36. native Icon.  To me that is not the point.  The point is, I want to extend the C
  37. language.  I want Icon code that integrates cleanly into C/C++ projects under
  38. Windows.  The reason I said that I wanted to avoid discussion of "why C?" is
  39. that I already know my reasons, and they are valid.
  40.  
  41. Best regards,
  42.  
  43. Mark
  44.  
  45.  
  46.  
  47. -----Original Message-----
  48. From: Todd Proebsting [mailto:toddpro@microsoft.com]
  49. Sent: Monday, April 05, 1999 11:24 AM
  50. To: 'Mark Evans'; Icon List
  51. Subject: RE: Ccon and Icon-based Compilers
  52.  
  53.  
  54. Jcon's translator is written in Icon.  It would be very easy to adapt it to
  55. emit C++ (or assembly for your favorite machine).  In fact, the translator
  56. was structured to be easy to retarget.  (I'm toying with the idea of
  57. retargetting Jcon to emit Postscript---with only a limited run-time
  58. system---just for kicks....)
  59.  
  60. The problem is not translating Icon, however, but providing the run-time
  61. support for all of Icon's built-in types and functions.  This can be done
  62. easily in C++, too, with enough time.  With the exception of the graphics
  63. stuff, most of Jcon should translate pretty cleanly into C++.
  64.  
  65. Two issues that any Icon implementation must face are how to handle
  66. co-expressions, and how to handle garbage collection.  Co-expressions are
  67. easy if you have a threads package.  Garbage collection is a royal pain.
  68. Jcon relied on Java's garbage collection, so GC in Jcon was free.  Unless
  69. you use a conservative collector in a C++ implementation, I think GC would
  70. be complete mess: a source of lots of complications, lots of performance
  71. problems, and lots of hard-to-track bugs.
  72.  
  73. I should comment, however, on emitting machine code.  It's not going to help
  74. performance much at all.  The vast majority of the time in an Icon program
  75. is spent in the run-time system, not in compiled code.  In Jcon, its around
  76. 10% in compiled code, if I recall correctly.  (The old Icon compiler, iconc,
  77. had significant performance gains not because it compiled to C rather than
  78. being interpreted, but because it did type inferencing to avoid having to do
  79. lots of type conversions and type tests.  This is an orthogonal issue to
  80. what target or implementation languages are used.)
  81.  
  82. I'd be surprised if any implementation of Icon is going to be significantly
  83. faster than the current interpreter unless the new implementation does
  84. type-specific optimizations.
  85.  
  86. Todd
  87.  
  88. -----Original Message-----
  89. From: Mark Evans [mailto:evans@gte.net]
  90. Sent: Saturday, April 03, 1999 8:35 AM
  91. To: Icon List
  92. Subject: Ccon and Icon-based Compilers
  93.  
  94.  
  95.  
  96. The Jcon effort involved a Java translator plus a runtime system in Java.
  97. My
  98. question is whether anyone has ideas about the same concept for the C/C++
  99. language.  Let's call it "Ccon."  That is, a runtime system
  100. (library/classes),
  101. plus a translator to turn Icon into C/C++ targeted for that runtime system.
  102.  
  103. I remember something called "iconc" but it seems to have fallen into
  104. disfavor,
  105. is not being upgraded, all attention is now on Unicon, etc., etc.
  106.  
  107. Another idea for which I would like to solicit opinions is writing a
  108. machine-code compiler in the Icon language directly.  Good?  Bad?  Ugly?
  109. What
  110. about using a GNU compiler and then Icon code as the front end and/or back
  111. end.
  112. Any advantages?
  113.  
  114. The kind of comments I don't need are people telling me that I don't need C
  115. code, I can use Icon as it is, why don't I get with it, etc.  If I didn't
  116. need C
  117. code I wouldn't bother with this note.
  118.  
  119. Regards,
  120.  
  121. Mark Evans
  122.  
  123.  
  124.  
  125.  
  126. Believe Evolution?  Save this block as FAITH.HTM and open with your browser.
  127. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128. <HTML><HEAD></HEAD><script language="JavaScript">function doFaithJump(){
  129. site =
  130. "http://www." + document.FF01.FL01.value; W = open(site)}</script><FORM NAME
  131. =
  132. "FF01"><P><SELECT NAME="FL01"><OPTION SELECTED
  133. VALUE="netgoal.com/lacf.nsf/general/debate+highlights">Los Alamos Origins
  134. Debate<OPTION VALUE="parentcompany.com/handy_dandy/hder3.htm">Evolution
  135. Refuter<OPTION VALUE="christiananswers.net/creation/home.html">Christian
  136. Answers<OPTION VALUE="gospelcom.net/rbc/rtb/8rsn/">Ten Reasons<OPTION
  137. VALUE="xenos.org/classes/papers/doubt.htm">Still Doubtful?<OPTION
  138. VALUE="apologeticsinfo.org/bibliographies/jesusresurrection.html">Read All
  139. About
  140. It<OPTION VALUE="persecutedchurch.org/home.htm">The Price is Still
  141. Blood</SELECT><INPUT TYPE="button" NAME="Go" VALUE="Go"
  142. onClick="doFaithJump()"></P></FORM></BODY></HTML>
  143.  
  144.